<?php
  /**
   * GroupManager.php
   * Links Managers to groups 
   */
class GroupManager extends AppModel
{
    var $name = 'GroupManager';
    var $primaryKey = 'id';
    //validation rules
        var $validate = array(
	'group_id'=> array(
		'rule'=>'numeric',
		'required'=>true
	),
	'mgr_id'=> array(
		'rule'=>'numeric',
		'required'=>true
	)
        );

}

public function deleteById($id)
    {
    	if($this.mgr_id==$id){
		$this->delete($this.id,true);
	}

    }

?>
